import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'

import './assets/styles/global.scss'

import electron from 'electron'
import mixins from './mixins'
import '@/plugins/element.js'
import utils from '@/utils'

import toolList from '@/components/toolList.vue'
import headerBar from '@/components/common/headerBar.vue'
import goBack from '@/components/common/goBack.vue'
import footerBar from '@/components/common/footer.vue'

Vue.component('tool-list', toolList)
Vue.component('header-bar', headerBar)
Vue.component('go-back', goBack)
Vue.component('footer-bar', footerBar)

if (!process.env.IS_WEB) Vue.use(require('vue-electron'))

Vue.mixin(mixins)
Vue.http = Vue.prototype.$ele = electron
Vue.http = Vue.prototype.$utils = utils
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  components: { App },
  router,
  store,
  template: '<App/>'
}).$mount('#app')
